<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Http\Requests\UserContext;
use App\Http\Services\PlatformService;
use App\Http\Traits\ResponseJson;

class PlatformController extends Controller
{
    use ResponseJson;

    protected $platformService;

    public function __construct(PlatformService $platformService)
    {
        $this->platformService = $platformService;
    }


    public function resourceList()
    {
        $data = $this->platformService->resourceList();
        return $this->returnJson($data);
    }

    public function articleDetail()
    {
        $data = $this->platformService->articleDetail();
        return $this->returnJson($data);
    }

    public function wechatMessageList()
    {
        $data = $this->platformService->wechatMessageList();
        return $this->returnJson($data);
    }

    public function helpList()
    {
        $data = $this->platformService->helpList();
        return $this->returnJson($data);
    }

    public function helpDetail()
    {
        $data = $this->platformService->helpDetail();
        return $this->returnJson($data);
    }

    public function dragonView(UserContext $userContext)
    {
        $data = $this->platformService->dragonView($userContext);
        return $this->returnJson($data);
    }


    public function createShareCard()
    {
        $data = $this->platformService->createShareCard();
        return $this->returnJson($data);
    }

    public function createSharePoster()
    {
        $data = $this->platformService->createSharePoster();
        return $this->returnJson($data);
    }

}
